﻿// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
import VueRouter from 'vue-router';
import App from './app_login.vue';
import router from '../app_login/app_login_router/app_login_router.js';
import Vuex from 'vuex';
import store from '../vuex/store_index';
import axios from 'axios';
import goto from "../common/goto/goto.js";
import {mapState, mapMutations,mapActions,mapGetters} from 'vuex'
Vue.prototype.$ajax = axios;

Vue.use(Vuex);
Vue.use(VueRouter);
Vue.use(goto);
Vue.config.productionTip = false;// 来关闭生产模式下给出的提示

//router.beforeEach((to, from, next) => {
//  if(store.getters.Loading_show == false){
//    store.commit('Change_loading_show')
//  }
//  if (to.meta.requireAuth) {
//    if (sessionStorage.getItem("user_login") == "true") {
//       next()
//    }
//    else {
//      next({
//        path: '/'
//      })
//    }
//  }else{
//    if (sessionStorage.getItem("user_login") == "true") {
//      next({
//        path: '/index'
//      })
//    }else{
//      next();
//    }
//   }
//})


/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  template: '<App/>',
  components: {App}
})
